
#include "video_mutex.h"


static SDL_mutex *video_mutex = NULL;


int video_mutex_init(void)
{
	video_mutex = SDL_CreateMutex();

	return 0;
}

int video_mutex_lock(void)
{
	if(video_mutex)
		SDL_LockMutex(video_mutex);

	return 0;
}

int video_mutex_unlock(void)
{
	if(video_mutex)
		SDL_UnlockMutex(video_mutex);

	return 0;
}

int video_mutex_deinit(void)
{
	if(video_mutex){
		SDL_DestroyMutex(video_mutex);
		video_mutex = NULL;
	}

	return 0;
}





